package com.java1412.dao;

import com.java1412.entity.Book;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.elasticsearch.repository.ElasticsearchRepository;

/**
 * @author java1412
 * @create 2021-07-21 12:19
 */
public interface BookRepository extends ElasticsearchRepository<Book, String> {

    // Optional<Book> findById(String id);

    Page<Book> findByAuthor(String author, Pageable pageable);
}
